import 'package:flutter/material.dart';
import 'package:hao_ke/routes/routes.dart';

class TitleContent extends StatelessWidget {

  final String title;

  final Object content;

  TitleContent(this.title,this.content, {super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(5),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          Text(title+ ": ",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),),
          Expanded(child: Text(content.toString(),maxLines: 1,overflow: TextOverflow.ellipsis,style: TextStyle(color: Colors.black87),)),
        ],
      ),
    ) ;
  }
  
}